package com.lzw.service.impl.student;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.lzw.mapper.student.SBuildingM;
import com.lzw.pojo.Building;
import com.lzw.service.student.SBuildingS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SBuildingSI implements SBuildingS {

    @Autowired
    private SBuildingM sBuildingM;

    @Override
    public List<Building> list(Integer pageNum, Integer pageSize, String name) {
        PageHelper.startPage(pageNum,pageSize);
        List<Building> list = sBuildingM.list(name);
        Page<Building> buildings = (Page<Building>) list;
        return buildings;
    }
}
